//卷组管理
(function($){
    $(function(){
        var resizePage = (function () {
            $("body").height($(window).height());
            var ww = $(window).width(),
                wh = $("body").innerHeight(),
                headerH = $(".tab-header").outerHeight(true),
                panelHeaderH = $(".panel-header").outerHeight(true),
                tableFootH = $(".table-footer").outerHeight(true),
                popFootH = $(".pop-foot").outerHeight(true),
                handleH = $(".ul_head").outerHeight(true),
                $mainPage = $(".main-page"),
                $topUlBody = $(".top_ul_body"),
                $pageContent = $(".page-content");

            $mainPage.height(wh - 40);
            $pageContent.height(wh - headerH - 30);
            $topUlBody.height(wh - panelHeaderH - tableFootH - handleH -41);
            return arguments.callee;
        })();

        $(window).resize(resizePage);
        //点击切换
        $(".tab-panel").outerTab({
            tabContentPanel:$(".page-content")
        })

        $(".tab-panel .tab-list:eq(0)").trigger("click");

        //分页
        var initPagination = function() {
            var total_page = 50;
            $("#pagination").pagination(total_page,{
                items_per_page : 10,
                prev_text:"上一页",
                next_text:"下一页",
                num_edge_entries : 3,
                ellipse_text : '...',
                num_display_entries : 5	,
                callback: page_callback,
                link_to : 'javascript:void(0)'
            });
        }();
        //分页点击回调
        function page_callback(page_index, jq){
            return false;
        }

		//挂载卷组飞出层 点击加选中样式
        $(".mount-manage-panel")
            .on("click",".ip-radio",function(e){
                e.stopPropagation();
                $(".li_tr").removeClass("active");
                $(this).closest(".li_tr").addClass("active");
            })



    })

})(jQuery)
